package com.avecsys.quotemanager.pojos;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class CompanyMasterPojo extends BasePojo implements Serializable {

	private Long companyId;
	private String companyName;
	private String addressLine1;
	private String addressLine2;
	private String city;
	private String companyType;
	private CountryMasterPojo countryMasterPojo = new CountryMasterPojo();
	private Set<SupplierMasterPojo> supplierMasterPojoSet = new HashSet<SupplierMasterPojo>(
			0);
	private Set<BuyerMasterPojo> buyerMasterPojoSet = new HashSet<BuyerMasterPojo>(
			0);

	public String getAddressLine1() {
		return addressLine1;
	}

	public String getAddressLine2() {
		return addressLine2;
	}

	public Set<BuyerMasterPojo> getBuyerMasterPojoSet() {
		return buyerMasterPojoSet;
	}

	public String getCity() {
		return city;
	}

	public Long getCompanyId() {
		return companyId;
	}

	public String getCompanyName() {
		return companyName;
	}

	public CountryMasterPojo getCountryMasterPojo() {
		return countryMasterPojo;
	}

	@Override
	public String getPkColumnName() {
		return "companyId";
	}

	public Set<SupplierMasterPojo> getSupplierMasterPojoSet() {
		return supplierMasterPojoSet;
	}

	@Override
	public boolean isPersisted() {
		if (companyId == null || companyId.intValue() == 0) {
			return false;
		} else {
			return true;
		}
	}

	public void setAddressLine1(String addressLine1) {
		this.addressLine1 = addressLine1;
	}

	public void setAddressLine2(String addressLine2) {
		this.addressLine2 = addressLine2;
	}

	public void setBuyerMasterPojoSet(Set<BuyerMasterPojo> buyerMasterPojoSet) {
		this.buyerMasterPojoSet = buyerMasterPojoSet;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getCompanyType() {
		return companyType;
	}

	public void setCompanyType(String companyType) {
		this.companyType = companyType;
	}

	public void setCountryMasterPojo(CountryMasterPojo countryMasterPojo) {
		this.countryMasterPojo = countryMasterPojo;
	}

	public void setSupplierMasterPojoSet(
			Set<SupplierMasterPojo> supplierMasterPojoSet) {
		this.supplierMasterPojoSet = supplierMasterPojoSet;
	}
}
